# 在 common/ 下 创建 get_header.py 文件 实现 get_header 函数
import requests
def get_header():
    url = "http://ihrm2-test.itheima.net/api/sys/login"
    data = {"mobile": "13800000002","password": "123456"}
    resp = requests.post(url=url, json=data)
    print(resp.json())

    token = resp.json().get("data")
    header = {"Content-Type": "application/json","Authorization": "Bearer " + token}
    return header
    # print(header)

# if __name__ == '__main__':
#     get_header()